<%@ page language="java" import="java.util.*,com.king.cms.common.*" pageEncoding="UTF-8"%>
<%@ include file="/hotel/include/css.jsp"%><%-- /*包含css样式表*/ --%> 
<%
   String type = request.getParameter("type");
   String title = "会议地点";
   if(null != type){
      if("0".equals(type)){
         title = title;
      }
      if("1".equals(type)||"2".equals(type)){
         title = "播放地点";
      }
      
   } 
   List bigroom = (List)request.getAttribute("dataList"); 
   StringBuffer idStr = new StringBuffer();
 %> 

<html>
<head>
<title>信息发布系统-<%=title%></title>
<script language="javaScript">
function selectRoom(){
   
    var str = form1.idStr.value; 
    var nameStr = '';
    var idStr = '';
    var contentStr = ''; 
    var objs = str.split('#');
    if(objs.length > 0){ 
	    for(var i = 0;i<objs.length-1;i++){
	    	 var temp = 'lcd_'+ objs[i]; 
	         var nameTemp = document.getElementById(temp); 
	         if(nameTemp.checked){
	            nameStr += document.getElementById('name_'+objs[i]).value;	
	            nameStr +=',';
	            idStr += objs[i]+',';
	            contentStr +='null#';
	         } 
	    }
	    
    }
    opener.form1.fieldflag.value='40';
   opener.form1.hytzPortName.value=nameStr;
   opener.form1.hytzPort.value=idStr;
   opener.form1.content.value=contentStr; 
   window.close();
   
}
function showDiv(lcdId){
   	  var str = 'tr_'+lcdId; 
      var obj = document.getElementById(str);  
      if(obj != null){ 
      	 if(obj.style.display=='')
      	    obj.style.display = 'none'; 
      	 else
             obj.style.display='';      	    
      	    
      }
   }
    
     function   addContent(id){       
        var obj = document.getElementById('div_'+id); 
        obj.insertAdjacentHTML('BeforeEnd','<br><input   type="text" class="area100"  name="lineCon_'+id+'"   size=18>');   
           
      }    
</script>
<head>
</head>
<body >
<form name="form1"   method="post" action=""> 
<center>
 <table border="0" align="center" cellpadding="4"    cellspacing="1" style="border-collapse: collapse;" bordercolor="#111111"   width="98%"   >
 
  <tr align="center">
    <td class="top_td" align="left" colspan=2><b> 终端LCD选择 </b></td>
  </tr>  
    
   <tr id="bigroom"  valign="top">
    <td class="td2" width="65%" align="center"><img src="<%=path %>/img/bigroom_r1_c1.jpg" align="left"></td>
    <td>
    <table algin="left" valign="top">
      <tr>
        <td><b>客户端选择</b></td> 
      </tr> 
      <%if(bigroom != null && bigroom.size() > 0){
           for(int i = 0;i<bigroom.size();i++){
                 Map m = (Map)bigroom.get(i);
                 String id = m.get("ID")+"";
                 idStr.append(id).append("#");  
       %>
       <tr>
        <td>	 
        	<input type="checkbox" value="<%=id%>" name="lcd_<%=id%>"  <%if(m.get("isSelect")!=null  ){out.print("checked");} %>><b><%=m.get("CLIENT_NAME") %>(
        	<%=m.get("CLIENT_ADDRESS") %>)</b>
        	 
        	<input type="hidden" name="name_<%=id%>" value="<%=m.get("CLIENT_NAME") %>">
        	
        	</td>
           
      </tr> 
      
      <%}}else{ %>
      <tr>
        <td> <font color="red"><b>没有可用客户端</b></font></td> 
      </tr> 
      <%} %>
    </table>
    </td>
  </tr>   
    
  <tr>
    <td   colspan="2" align="right">
    	 <input type="hidden" name="idStr" value="<%=idStr%>">
    	<span align="right"><input type="button"  class="area100" value="确定" onclick="javaScript:selectRoom();">&nbsp;&nbsp;
    	<input type="button" value="关闭" class="area100" onclick="javaScript:window.close();"></span>
    </td>
  </tr>
 
</table> 
</center>
 
</form> 
</body>
</html>

 